import requests from '@/utlis/requests.js'
//获取文章列表
export const getArticalListService = (params) =>
  requests.get('/my/article/list', { params })

//发布文章
export const addArticalService = ({
  title,
  cate_id,
  content,
  cover_img,
  state
}) =>
  requests.post('/my/article/add', {
    title,
    cate_id,
    content,
    cover_img,
    state
  })

//获取文章详情
export const getArticalInfo = (id) =>
  requests.get('/my/article/info', { params: { id } })
